package com.youway.ddd.demo2.interfaces.facade;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.youway.ddd.demo2.application.service.BookshelfSpaceService;
import com.youway.ddd.demo2.domain.entity.BookshelfSpace;
import com.youway.ddd.demo2.infrastructure.base.resp.RespBody;

/**
 * @author EalenXie create on 2018/8/30 18:10.
 * 为远程客户端提供粗粒度的调用接口
 */
@RestController
public class BookshelfSpaceFacade {
	

    @Resource
    private BookshelfSpaceService bookshelfSpaceService;

    /**
     * 获取bookshelfSpace信息
     */
    @GetMapping("/getBookshelfSpace")
    public RespBody<BookshelfSpace> getBookshelfSpace(@RequestParam Long bookshelfSpaceId) {
         return bookshelfSpaceService.getBookshelfSpace(bookshelfSpaceId);
    }

}